package com.gome.comp;

import com.gome.vue4j.core.AbstractVue4jComponent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;

/**
 * 定义一个简单的按钮组件
 */
public class L11RedButton extends AbstractVue4jComponent {

    @Override
    public CharSequence render() {
        imports(Button.class);
        return "<Button text=\"红色按钮\" onAction=\"#hi\" style=\"-fx-background-color: red\" />";
    }

    @FXML
    void hi(){
        System.out.println("红色按钮被点击");
    }
}
